import { IBusinessStatus } from '@/modules/interface';
import styled from '@emotion/styled';
import { Button } from 'antd';
import { t } from 'i18next';
import React from 'react';
import ZcoForm from '../../ZcoForm';

const FormResult = styled.div`
	height: calc(100% - 95px);
	min-height: 200px;
	padding-top: 18px;
	border-top: 1px solid #f1f1f1;
	margin-top: 18px;
	display: ${(props: { status: string }) => (props.status !== IBusinessStatus.DONE && props.status !== IBusinessStatus.CANCEL && props.status !== IBusinessStatus.REJECTED ? 'none' : '')};
`;

interface FormItemProps {
	id: string;
	title: string;
	detailId?: string | number;
	template?: string;
	status: IBusinessStatus;
}

const FormItem = (props: FormItemProps) => {
	const { id, title, template, status, detailId } = props;

	const handleChange = () => {};

	return (
		<>
			<FormResult status={status}>
				<ZcoForm height={230} id={id} title={title} template={template} detailId={detailId} />
			</FormResult>
		</>
	);
};

export default FormItem;
